<div class="pad_t15" style="height:580px;">
	<?php 
		$i=0;
		foreach($ctx->photoview['result'] as $photoview)
		{
			$i++;
			$imagesDir =$ctx->imgpath ;
			if(isset($photoview['PhotoRelations'][0]['MyFavorites']['status']))
			{
			$favorite_status = $photoview['PhotoRelations'][0]['MyFavorites']['status'];
			}
			else {
		$favorite_status = '';
		}
	?>
    <div class="PhtList">
	<a href="/album/photos/photo-view-large/<?php echo base64_encode($ctx->type).'/'.base64_encode($ctx->photo_diffid).'/'.$i ;?>">
    <img src="<?php echo $imagesDir.$photoview['photo']; ?>" width="185" height="175" alt="" class="fix<?php echo $photoview['photo_id']; ?> "/></a>
	<?php 
	if($photoview['PhotoRelations'][0]['is_owner']==1)
	{
		$id=$photoview['photo_id'];
		$type="photo_id";
	}
	else
	{
		$id=$photoview['PhotoRelations'][0]['id'];
		$type="relation_id";
	}
//echo $user_id.'--'.$favorite_status;exit;

 ?>
 
 <script type="text/javascript">
		$(function() {

			$('#default').capty();

			$('#animation').capty({
				animation: 'fade',
				speed:		400
			});

			$('#fixed').capty({
				animation:	'fixed'
			});

			$('#content').capty({
				height:		46,
				opacity:	.6
			});

			$('.fix<?php echo $photoview['photo_id']; ?>').capty({
				 
				cWrapper:	'capty-tile',
				prefix:		'<input type="checkbox" name="check_list[]" id="check_list" value="<?php echo $id;?>" class="Fleft" />&nbsp;<span class="txt_sm Fleft"><?php echo ago(strtotime($photoview['added_date'])) ?></span>',
				sufix:		'<?php if($favorite_status=="Active"){?><span><a href="javascript:void(0);" onclick="changeStatusFavorite(<?php echo $photoview['photo_id'];?>,0)"><img src="/images/FavorIconAct.png" alt="Favorite" title="Favorite" /></a></span><? } else {?><span><a href="javascript:void(0);" onclick="changeStatusFavorite(<?php echo $photoview['photo_id'];?>,1);"><img src="/images/FavorIconNor.png" alt="Favorite" title="Favorite" /></a></span><? } ?><?php if($photoview['PhotoRelations'][0]['is_owner']==1){ ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" onclick="sharePhotos(<?php echo $photoview['photo_id'];?>);"><img src="/images/IconSha.png" alt="Share" title="Share" /></a>&nbsp;&nbsp;<a href="#"><img src="/images/coffee.png" /></a>&nbsp;<? } ?><a href="javascript:void(0);" onclick="deletePhoto(<?php echo $id;?>);"><img src="/images/CloseIcon.png" alt="Delete" title="Delete" /></a>'
			});

		});
	</script>
   </div>
  
	<? } ?>
	

</div>